<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html>
<head>
	<meta charset="UTF-8">
    <title>日志</title>
    <%@ include file="head.jsp" %>
</head>
<body>
<blockquote class="layui-elem-quote" style="margin-top: 20px;margin-left: 10px;">机器人日志查看</blockquote>
<div class="layui-tab-item layui-show" style="margin-left: 10px">
    <div>
        <form class="layui-form">
            <div class="layui-inline">
                <input class="layui-input" name="car_id" id="car_id" placeholder="机器人id" autocomplete="off">
            </div>
            <button class="layui-btn" lay-submit lay-filter="search" data-type="reload">搜索</button>

        </form>
        <table class="layui-table" id="car_log" lay-filter="dateTables"></table>
    </div>
</div>


<script>
    //JavaScript代码区域
    layui.use(['element','layer','form','table','laydate'],function(){
        var element = layui.element;
        var layer = layui.layer;
        var $ = layui.$;
        var form = layui.form;
        var table = layui.table;
        var laydate = layui.laydate;
        
        
        

        //第一个实例
        var eq_logT = table.render({
            elem: '#car_log'
            ,height: 435
            ,url: 'selectCar_run' //数据接口
            ,page: true //开启分页
            ,cols: [[ //表头
            	{type:'numbers',title:'序号'}
                ,{field: 'car_id', title: '机器人ID'}
                ,{field: 'date_save_ele', title: '机器人存电日期'}
                ,{field: 'date_begin', title: '存电开始时间'}
                ,{field: 'date_end', title: '存电结束时间'}

            ]]
        });
      
        

        form.on('submit(search)',function(data){
        	eq_logT.reload({
                where: { //设定异步数据接口的额外参数，任意设
                    car_id: data.field.car_id
                    
                }
            });
            return false;
        });

    });
</script>
</body>
</html>